<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;

/* @var $this yii\web\View */
/* @var $model backend\modules\admin\models\admin */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="row">

    <div class="col-xs-12">
    <div style="height:20px"></div>
        <?php
        $label_class=['class'=>'col-sm-3 control-label no-padding-right'];
        $form = ActiveForm::begin(
            [
                'fieldConfig'=>[
                    'options' => ['enctype' => 'multipart/form-data', 'class' => 'form-horizontal'],
                    'template'=> "<div class=\"form-group\">{label}\n<div class=\"col-sm-5\">{input}</div><div class=\"col-sm-3\">{error}</div></div>",
                    'labelOptions' =>['class' => $label_class],
                ],
            ]
        );
        ?>

        <?= $form->field($model, 'username')->textInput(['value'=>$model->username,'maxlength' => 20,'readonly'=>"readonly"]); ?>
        <?= $form->field($model, 'roleid')->dropDownList(ArrayHelper::map($roles,'roleid', 'rolename'),['value'=>$rol->roleid]);?>
        <?= $form->field($model, 'realname')->textInput(['value'=>$model->realname,'maxlength' => 50]) ?>
        <?= $form->field($model, 'tel')->textInput(['maxlength' => 20,'class'=>'form-control border-input']); ?>
        <?= $form->field($model, 'city_id')->dropDownList([1=>'济南市']);?>
      
        <?= $form->field($model, 'department_id')->dropDownList(ArrayHelper::map($department,'dp_id','dp_name'));?>
        <?= $form->field($model, 'isAccept')->dropDownList([1=>'是',0=>'否']);?>
        <div class="clearfix">
            <div class="col-md-offset-3 col-md-9">
                <?= Html::submitButton('提交', ['class'=>'btn btn-info','name' =>'submit-button']) ?>
                <?= Html::resetButton('重置', ['class'=>'btn btn-primary','name' =>'reset-button']) ?>
            </div>
        </div>



        <?php ActiveForm::end(); ?>
    <div class="space-4"></div>

    </div><!-- /.col -->

</div><!-- /.row -->
